/**
 * 
 */
package net.jwtools.tmt.domain;

public enum Gender {
	MALE(1), FEMALE(2), UNKNOWN(0);
	private int value;

	Gender(int value) {
		this.value = value;
	}
	// the identifierMethod
	public int toInt() {
		return value;
	}
	// the valueOfMethod
	public static Gender fromInt(int value) {
		switch (value) {
		case 1:
			return MALE;
		case 2:
			return FEMALE;
		default:
			return UNKNOWN;
		}
	}
}